﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace ImdbRipperBrowser
{
  public class Movie
  {
    private const int LISTS_CAPACITY = 10;

    public Movie(string id)
    {
      if (string.IsNullOrEmpty(id))
        throw new ArgumentNullException("id");

      this.Id = id;
    }

    public string Id { get; private set; }

    public string Title { get; set; }

    public int Year { get; set; }

    public string ImdbUrl { get; set; }

    public float Rating { get; set; }

    private IList<string> genresList = new CapacityList(LISTS_CAPACITY, Environment.NewLine);
    public IList<string> GenresList
    {
      get
      {
        return genresList;
      }
    }

    public string Genres
    {
      get
      {
        return this.GenresList.ToString();
      }
    }

    public string Summary { get; set; }

    private IList<string> directorsList = new CapacityList(LISTS_CAPACITY, Environment.NewLine);
    public IList<string> DirectorsList
    {
      get
      {
        return directorsList;
      }
    }

    public string Directors
    {
      get
      {
        return this.DirectorsList.ToString();
      }
    }

    private IList<string> writersList = new CapacityList(LISTS_CAPACITY, Environment.NewLine);
    public IList<string> WritersList
    {
      get
      {
        return writersList;
      }
    }

    public string Writers
    {
      get
      {
        return this.WritersList.ToString();
      }
    }

    private IList<string> castList = new CapacityList(LISTS_CAPACITY, ", ");
    public IList<string> CastList
    {
      get
      {
        return castList;
      }
    }

    public string Cast
    {
      get
      {
        return this.CastList.ToString();
      }
    }

    public Bitmap Thumbnail { get; set; }
  }
}